home *** CD-ROM | disk | FTP | other *** search
-
- GETGROUPS(2) UNIX Programmer's Manual GETGROUPS(2)
-
- NNAAMMEE
- ggeettggrroouuppss - get group access list
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssyyss//ppaarraamm..hh>>
- ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
- ##iinncclluuddee <<uunniissttdd..hh>>
-
- _i_n_t
- ggeettggrroouuppss(_i_n_t _g_i_d_s_e_t_l_e_n, _g_i_d___t _*_g_i_d_s_e_t)
-
- DDEESSCCRRIIPPTTIIOONN
- GGeettggrroouuppss() gets the current group access list of the current user pro-
- cess and stores it in the array _g_i_d_s_e_t. The parameter _g_i_d_s_e_t_l_e_n indicates
- the number of entries that may be placed in _g_i_d_s_e_t. GGeettggrroouuppss() returns
- the actual number of groups returned in _g_i_d_s_e_t. No more than
- {NGROUPS_MAX} will ever be returned. If _g_i_d_s_e_t_l_e_n is 0, ggeettggrroouuppss() re-
- turns the number of groups without modifying the _g_i_d_s_e_t array.
-
- RREETTUURRNN VVAALLUUEESS
- A successful call returns the number of groups in the group set. A value
- of -1 indicates that an error occurred, and the error code is stored in
- the global variable _e_r_r_n_o.
-
- EERRRROORRSS
- The possible errors for ggeettggrroouuppss() are:
-
- [EINVAL] The argument _g_i_d_s_e_t_l_e_n is smaller than the number of groups
- in the group set.
-
- [EFAULT] The argument _g_i_d_s_e_t specifies an invalid address.
-
- SSEEEE AALLSSOO
- setgroups(2), initgroups(3)
-
- HHIISSTTOORRYY
- The ggeettggrroouuppss() function call appeared in 4.2BSD.
-
- 4.2 Berkeley Distribution April 16, 1994 1
-